html {
    height: 95%;
}

.main-container {
    width: 120rem;
    height: 100%;
    // height: 93.75rem;
    margin: 0 auto;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    padding-bottom: 3.125rem;
    border-radius: 1.25rem;
    // position: relative;

    .title {
        position: relative;
        .text {
            color: #fff;
            font-size: 2.5rem;
        }
        .plus {
            position: absolute;
            right: 20%;
            font-size: 2.625rem;
        }
    }

    .list {
        width: 100%;
        height: 100%;
        // max-height: 130rem;
        margin: 0 auto;
        padding: .625rem 3.125rem 3.125rem 3.125rem;
        margin-top: 1.25rem;
        border-radius: 1.25rem;
        background: #f6f6f6;
        position: relative;

        .chat {
            height: 110rem;
            // max-height: 85rem;
            overflow-y: scroll;
        }

        .chat::-webkit-scrollbar {
            display: none; /* 针对 Chrome 和 Safari */
        }

        .time {
            font-size: 2.25rem;
            margin-top: 1.25rem;
            margin-bottom: 1.25rem;
        }

        .newCon {
            margin-top: 5.625rem !important;
            margin-bottom: 2.75rem !important;
        }

        .item {
            width: 100%;
            height: 12rem;
            margin-top: 1.875rem;

            &:first {
                margin-top: 0;
            }

            .boxCon {
                align-items: baseline;
            }

            .talk {
                max-width: 80%;
                border-radius: 1.25rem;
                font-size: 2.5rem;
                padding: 2.1875rem;
                margin-left: 3.3125rem;

                &.reply {
                    background: #d6f0fd;
                    margin-left: 0;
                    margin-right: 3.3125rem;
                    margin-top: 1.25rem;
                    padding: 1.25rem;
                }
            }

            .icon {
                width: 7.5rem;
                height: 7.5rem;

                &.point {
                    position: relative;
                    &::before {
                        content: "";
                        display: block;
                        width: 1.25rem;
                        height: 1.25rem;
                        border-radius: 50%;
                        position: absolute;
                        top: -0.1875rem;
                        right: -0.1875rem;
                    }
                }

                &.voice {
                    width: 1.875rem;
                    height: 1.875rem;
                }

                &.image {
                    width: 18.75rem;
                    height: 13.75rem;
                }
            }
        }

        .tools {
            position: absolute;
            bottom: 2rem;
            left: 50%;
            transform: translate(-50%, 0);

            img {
                width: auto;
                height: 100%;
            }
            #voice {
                // position: absolute;
                // z-index: 2;
            }

            .input {
                margin-left: 5rem;
                .form-control {
                    width: 64.1875rem;
                    height: 6rem;
                    border-radius: 1.875rem;
                    font-size: 3rem;
                }
            }

            .topicon {
                width: 4.375rem;
                height: 4.375rem;
                display: flex;
                justify-content: center;
                align-items: center;
                margin: 0 1.125rem;
                &:nth-of-type(2) {
                    margin-left: 2.125rem;
                    margin-right: 0;
                }
                &:last-of-type {
                    margin-left: 0;
                    margin-right: 0rem;
                }
            }

            .icon {
                width: 4.375rem;
                height: 4.375rem;
                display: flex;
                justify-content: center;
                align-items: center;
                margin: 0 1.125rem;
            }

            .function {
                width: 90%;
                margin: 0 auto;
                margin-top: 2.8125rem;
                display: none;

                .iconitem {
                    cursor: pointer;
                    display: flex;
                    flex-direction: column;
                    align-items: center;

                    .icon {
                        width: 7.1875rem;
                        height: 7rem;
                        padding: 1.5625rem;
                        margin-top: .875rem;
                        border-radius: 1.25rem;
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        flex-direction: column;
                        background: #e5e5e5;
                    }
                    .text {
                        margin-top: .6875rem;
                        font-size: 1.5rem;
                    }
                }
            }
            /* 表情包容器初始隐藏 */
            .emoji-container {
                // height: 200px;
                display: none;
                flex-wrap: wrap;
                justify-content: center;
                align-items: center;
                margin-top: .625rem;
                background: #fff;
            }

            /* 单个表情包样式 */
            .emoji {
                font-size: 2.5rem;
                margin: .625rem;
                display: inline-block;
                cursor: pointer;
            }
        }
    }

    // 录音弹窗

    // 遮罩层
    .mask {
        display: none;
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(240, 248, 255, 0.8);
        pointer-events: none;
    }
    .recording-popup {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 90%;
        // pointer-events: none;
        // background-color: rgba(240, 248, 255, 0.8);

        // z-index: 1;
        p {
            width: 100%;
            position: absolute;
            left: 0%;
            top: 60%;
            font-size: 2rem;
            text-align: center;
            letter-spacing: 4px;
            z-index: 2;
        }
        button {
            position: absolute;
            left: 50%;
            top: 80%;
            font-size: 3rem;
            border: none;
            text-align: center;
            color: rgba(166, 166, 166, 1);
            background: transparent;
            z-index: 2;
            cursor: pointer;
        }

        /* 动态图标容器样式 */
        .audio-waveform {
            position: absolute;
            left: 50%;
            top: 60%;
            margin-left: -36px;
            width: 100px;
            height: 100px;
            margin-top: 30px;
            display: flex;
            justify-content: center;
            align-items: center;
            position: relative;
            z-index: 2;
        }

        /* 单个音频波形条样式 */
        .waveform-bar {
            width: 6px;
            background-color: #007bff;
            border-radius: 3px;
            position: absolute;
            bottom: 0;
            animation: waveformAnimation 1s ease-in-out infinite alternate;
            opacity: 0;
        }

        /* 定义音频波形动画keyframes */
        @keyframes waveformAnimation {
            0% {
                height: 2px;
                opacity: 0.3;
            }

            100% {
                height: 45px;
                opacity: 1;
            }
        }
    }
}

/* 相机弹窗对应的样式 */
#preview-container {
    margin-top: 1.25rem;
    border: .0625rem solid #ddd;
    padding: .625rem;
    background-color: #f9f9f9;
    border-radius: .5rem;
}

.preview-item {
    margin: .625rem 0;
    display: flex;
    align-items: center;
}

.preview-item img {
    max-width: 60vw;
    margin-right: .625rem;
}

.preview-item .file-name {
    font-size: .875rem;
    color: #555;
}

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1000;
}

.popup-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    padding: 20px;
    min-width: 300px;
    text-align: center;

    button {
        border: none;
        padding: 0;
        margin: 0;
        background: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .button-style {
        color: #fff;
        background-color: rgba(34, 135, 249, 1);
        border: 1px solid rgba(34, 135, 249, 1);
        padding: 2px 10px;
        border-radius: 10px;
    }
    .button-style:active {
        background-color: rgba(34, 135, 249, 1);
        border: 1px solid rgba(34, 135, 249, 1);
    }
    .popup-close {
        color: rgba(166, 166, 166, 1);
        font-size: 24px;
        font-weight: 600;
    }
}
